import axios from "axios";

axios.defaults.timeout = 5000;
axios.defaults.headers.post['Content-Type'] = 'application/json';
/*axios.defaults.baseURL = 'http://192.168.6.108:8080/service';*/
axios.defaults.baseURL = 'http://yirenyiti.gaozhikeji.com/daiyan/service';

axios.interceptors.request.use(config => {
  // loading
  return config
}, error => {
  return Promise.reject(error)
});

axios.interceptors.response.use(response => {
  return response
}, error => {
  return Promise.resolve(error.response)
});

export default axios;
